<style>
	label input {
    display: none; }
    label span {
    display: block;
    width: 24px !important;
   
    height: 24px !important;
    border: 1px solid #CCCCCC;
    position: relative; }
    label span i {
    	 margin: 3px 2px 0px 0;
      display: none;
      color: #CCCCCC;
      position: absolute;
      font-size: 30px !important;
      top: -15px;
      left: 0; }
    .right .redParent {
    	position: relative;
    }
    .right .red {
    	color: red;
    	position: absolute;
    	right: 24%;
    	top: 0;
    }
    
     .left .red {
    	        color: red;
    position: absolute;
    left: 35%;
    top: 40px;
    }
    
	
</style>
<div id="content-header">
    <div id="breadcrumb"> <a  title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 销售管理</a> 
    	<a ui-sref="home.sale" class="current">销售合同</a> </div>
</div>
<div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
		<div class="widget-box">
            <div class="widget-content nopadding" >
            	<ul id="myTab" class="nav nav-tabs" style="margin: 0 0 20px 0;text-align: center; height: 0px; border: none;">
				</ul>
				<form  class="addupdate" name="addupdate"  novalidate="novalidate">
                 	<div class="left">
                    	<p class="redParent">
                    		<span class="text">项目名称 </span>
                    		<select-url item-array="project"  selected="add.projectId" value="projectId"></select-url>
							<span class="red" >*</span>
                    	</p>
                    	<p class="p"> 
                    		<span class="text">合同编号 </span>
                    		<input type="text"  autocomplete="off" name="cSerialNum" ng-model="add.cSerialNum" />
                    	</p>
                    	<p class="p"> 
                    		<span class="text">合同名称 </span>
                    		<input type="text"  autocomplete="off" name="cName" ng-model="add.cName" />
                    	</p >
                    	<p class="redParent">
                    		<span class="text">合同甲方 </span>
                    		
                    		<select-url item-array="saleCompany"  selected="add.companyPecificId" value="companyPecificId"></select-url>
                    	</p>
                    	<p class="p"> 
                    		<span class="text">合同金额 </span>
                    		<input type="text"  autocomplete="off" name="cAmount" ng-model="add.cAmount" ng-pattern="/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/" />
                    		<span class="warn"  ng-if="addupdate.cAmount.$error.pattern">金额格式错误</span>
                    	</p >
                    	<p class="p"> 
                    		<span class="text">合同决算金额 </span>
                    		<input type="text" autocomplete="off" name="cForecost" ng-model="add.cForecost" ng-pattern="/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/" />
                    		<span class="warn"  ng-if="addupdate.cForecost.$error.pattern">金额格式错误</span>
                    	</p>
                    	<p class="p"> 
                    		<span class="text">合同周期 </span>
                    		<input type="text" autocomplete="off" name="cCycle"  ng-model="add.cCycle" />
                    	</p>
                    </div>
                    <div class="right">
                    	<p class="p"> 
                    		<span class="text">合同类型 </span>
                    		<select  ng-model="add.cKind"  
                    			ng-options="o.diId as o.diName for o in contactTypeDic"></select>
                    	</p >
                    	<p class="p"> 
                    		<span class="text">收款计划 </span>
                    		<select  ng-model="add.cPaymentPlan"  
                    			ng-options="o.diId as o.diName for o in paymentDic"></select>
                    	</p>
                    	<p class="p"> 
                    		<span class="text">是否完成收款计划 </span>
                    		<select  ng-model="add.cIfCompletePlan"  
                    			ng-options="o.id as o.name for o in sexList"></select>
                    	</p>
						<p class="p"> 
                    		<span class="text">开票</span>
                    		<select  ng-model="add.cIfPayInvoice"  
                    			ng-options="o.id as o.name for o in sexList"></select>
                    	</p>
                    	<p class="p" ng-if="id!=''"> 
                    		<span class="text">已收款</span>
                    		<input type="text" autocomplete="off" name="payAcount"  ng-model="add.payAcount" disabled />
                    	</p>
                    	<p class="p"  ng-if="id!=''"> 
                    		<span class="text">应收款</span>
                    		<input type="text" autocomplete="off" name="receivables"  ng-model="add.receivables" disabled />
                    	</p>
                    	<p class="p"> 
                    		<span class="text">签订日期</span>
                    		<model-picker  class="datetimepicker"  ng-model="pickertime" ></model-picker>
                    	</p>
                    	<p class="p">
                    		<span class="text">备注</span>
                    		<textarea type="text" ng-model="add.cRemark" />
                    	</p>
                    	<p class="submitButton p">
                    		<button  ng-class="{true:'btn-primary'}[addupdate.$invalid||add.projectId==null]" 
											      	 	ng-disabled="addupdate.$invalid||add.projectId==null" type="submit" 
											      	 	class="btn  greenbtn"  ng-click="sub()" >提交</button>
                    		<button class="btn" ng-click="rement()" >取消</button>
                    	</p>
                    </div>
                </form>
              
            </div>
        </div>
    </div>
</div>
